#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void swap_arr(int arr[], int sz)
{
	int left = 0;
	int right = sz-1;
	while (left < right)
	{
		if (left < right && arr[left] % 2 != 0)
			left++;
		if (left < right && arr[right] % 2 != 1)
			right--;
		if (arr[left] % 2 == 0 && arr[right] % 2 == 1)
		{
			int temp = arr[left];
			arr[left] = arr[right];
			arr[right] = temp;
		}
	}
}
int main()
{
	int a[20] = {  };
	int i = 0;
	while (1)
	{
		if (scanf("%d", &a[i]) == 0)
			break;
		i++;

	}
	int sz = sizeof(a) / sizeof(a[0]);
	
	swap_arr( a,  sz);
	int j = 0;
	for (j; j < sz; j++)
	{
		printf("%d ", a[j]);
	}
	return 0;
}